home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
09 Application Software
/
SOFTIN.BIN
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
6KB
|
373 lines
50 PRINTCHR$(147)
60 POKE 53280,0:POKE 53281,0
100 PRINT" ****************************"
110 PRINT" *** SOFTWARE INVENTORY ***"
120 PRINT" *** PROGRAM ***"
130 PRINT" *** ***"
140 PRINT" *** DESIGNED AND WRITTEN ***"
150 PRINT" *** BY: DAVID HAILEY ***"
160 PRINT" ****************************"
164 PRINT"PRESS ANY KEY TO BEGIN"
165 GET A$:IF A$="" THEN 165
170 :
180 REM ****************************
190 REM * DATA FOR SUBJECT MENU *
200 REM ****************************
210 :
220 DATA"ADVENTURE GAMES","ARCADE GAMES","BUSINESS SOFTWARE"
230 DATA"COMPUTER ART SOFTWARE","EDUCATIONAL SOFTWARE","MUSIC SOFTWARE"
240 DATA"ROLL-PLAYING GAMES","STRATEGIE GAMES","SPORTS SOFTWARE"
250 DATA"UTILITY SOFTWARE","MISCELLANEOUS SOFTWARE","EXIT PROGRAM"
260 :
270 REM ****************************
280 REM * PROCESSING *
290 REM ****************************
300 :
310 DIM S$(12),SOFT$(200),D$(200),I(200)
320 RESTORE
325 LET SM=12
330 :
340 FOR X=1 TO SM
350 READ S$(X)
360 NEXT X
370 :
380 POKE 53281,0:POKE 53280,0
390 PRINTCHR$(147);"[153]":LET C=0
400 PRINT TAB(7)"SUBJECT MENU"
405 PRINT TAB(6)"[183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
410 PRINT:PRINT
420 :
430 FOR X=1 TO SM
440 IF X=10 THEN 480
441 IF X=11 THEN 480
445 IF X=12 THEN 495
450 PRINT " ";X;"[157]. ";S$(X)
460 GOTO 510
470 :
480 PRINT X;"[157]. ";S$(X)
490 GOTO 510
494 :
495 PRINT:PRINT X;"[157]. ";S$(X)
496 GOTO 510
500 :
510 NEXT X
520 :
530 PRINT:PRINT
540 INPUT"ENTER NUMBER OF CHOICE: ";C
541 IF C<1 OR C>SM THEN 390
545 IF C=SM THEN 10000
550 LET F=C+4
560 :
570 FOR H=1 TO 50:NEXT H
580 :
590 PRINTCHR$(147)
594 :
595 GOSUB 8000
596 :
600 PRINT"";S$(C);"[146]"
610 PRINT:PRINT:PRINT
620 PRINT"OPTIONS"
630 PRINT"[183][183][183][183][183][183][183]"
640 PRINT
650 PRINT"A[146]DD ENTRIES"
660 PRINT"D[146]ELETE ENTRIES"
670 PRINT"L[146]IST ENTRIES"
680 PRINT"S[146]ORT ENTRIES"
690 PRINT"P[146]RINT ENTRIES"
700 PRINT
710 PRINT"R[146]ETURN TO SUBJECT MENU"
720 PRINT:PRINT
730 PRINT"ENTER FIRST LETTER OF OPTION"
740 GET A$:IF A$="" THEN 740
750 :
751 IF C=3 THEN LET S$(3)="BUSINESS"
752 IF C=4 THEN LET S$(4)="COMPUTER ART"
753 IF C=5 THEN LET S$(5)="EDUCATIONAL"
754 IF C=7 THEN LET S$(7)="ROLL-PLAYING"
755 IF C=11 THEN LET S$(11)="MISCELLANEOUS"
756 :
760 IF A$="A" THEN 1000
770 IF A$="D" THEN 2000
780 IF A$="L" THEN 3000
790 IF A$="S" THEN 4000
800 IF A$="P" THEN 5000
810 IF A$="R" THEN 320
820 :
830 GOTO 590
1000 :
1010 REM ****************************
1020 REM * ADD ENTRIES *
1030 REM ****************************
1040 :
1050 PRINTCHR$(147):LET E=0
1060 INPUT"HOW MANY ENTRIES: ";N
1070 IF N=0 THEN GOTO 590
1080 :
1090 OPEN F,8,2,"0:"+S$(C)+",S,R"
1100 :
1110 INPUT#F,E
1120 :
1130 FOR X=1 TO E
1140 INPUT#F,SOFT$(X)
1150 NEXT X
1160 :
1170 CLOSE F
1180 :
1185 PRINT
1190 FOR Z=(E+1) TO (E+N)
1200 PRINT"ENTRY #";Z;": ";
1210 INPUT SOFT$(Z)
1220 NEXT Z
1230 :
1240 PRINTCHR$(147):PRINT"ENTRIES:"
1250 PRINT"[183][183][183][183][183][183][183]"
1260 :
1270 FOR Z=(E+1) TO (E+N)
1280 PRINT SOFT$(Z)
1290 NEXT Z
1300 :
1310 PRINT:PRINT"ARE THESE CORRECT? [Y/N]"
1320 GET A$:IF A$="" THEN 1320
1330 IF A$="Y" THEN 1360
1340 GOTO 590
1350 :
1360 LET E=E+N
1361 PRINTCHR$(147);TAB(7)"***** ADDING ENTRIES *****"
1370 :
1380 OPEN F,8,2,"@0:"+S$(C)+",S,W"
1390 :
1400 PRINT#F,E
1410 :
1420 FOR X=1 TO E
1430 PRINT#F,SOFT$(X)
1440 NEXT X
1450 :
1460 CLOSE F
1470 :
1480 GOTO 590
2000 :
2010 REM ****************************
2020 REM * DELETE ENTRIES *
2030 REM ****************************
2040 :
2050 PRINTCHR$(147):LET E=0
2060 INPUT"ENTER NUMBER OF ENTRY TO DELETE:";D
2070 :
2080 IF D=0 THEN GOTO 590
2090 :
2100 OPEN F,8,2,"0:"+S$(C)+",S,R"
2110 INPUT#F,E
2120 :
2130 FOR X=1 TO E
2140 INPUT#F,SOFT$(X)
2150 NEXT X
2160 :
2170 CLOSE F
2180 :
2190 LET SOFT$(D)=""
2191 :
2192 FOR X=(D+1) TO E
2193 LET SOFT$(X-1)=SOFT$(X)
2194 NEXT X
2195 :
2196 LET SOFT$(E)=""
2200 LET E=E-1
2210 :
2220 OPEN F,8,2,"@0:"+S$(C)+",S,W"
2230 PRINT#F,E
2240 :
2250 FOR X=1 TO E
2260 PRINT#F,SOFT$(X)
2270 NEXT X
2280 :
2290 CLOSE F
2300 :
2310 GOTO 590
3000 :
3010 REM ****************************
3020 REM * LIST ENTRIES *
3030 REM ****************************
3040 :
3050 PRINTCHR$(147):LET M=15:LET E=0
3054 :
3055 GOSUB 8000
3056 :
3060 PRINT"";S$(C);"[146]"
3070 PRINT:PRINT
3080 :
3084 :
3085 GOSUB 9000
3086 :
3090 OPEN F,8,2,"0:"+S$(C)+",S,R"
3100 INPUT#F,E
3105 IF E=0 THEN 3340
3110 :
3120 FOR X=1 TO E
3130 INPUT#F,SOFT$(X)
3140 NEXT X
3150 :
3160 CLOSE F
3170 :
3180 FOR X=1 TO E
3181 IF X>9 THEN 3190
3182 PRINT " ";X;"[157]. ";SOFT$(X)
3183 GOTO 3200
3190 PRINT X;"[157]. ";SOFT$(X)
3200 IF X=E THEN 3340
3210 IF X=M THEN GOSUB 3260
3220 NEXT X
3230 :
3240 GOTO 3350
3250 :
3260 LET M=M+15
3270 PRINT:PRINT"CONTINUE - PRESS ANY KEY"
3280 GET A$:IF A$="" THEN 3280
3290 PRINTCHR$(147)
3300 PRINT"";S$(C);"[146]"
3310 PRINT:PRINT
3320 RETURN
3330 :
3340 PRINT:PRINT"END OF LISTING"
3350 PRINT:PRINT"PRESS ANY KEY TO RETURN TO MENU"
3360 GET A$:IF A$="" THEN 3360
3365 CLOSE F
3370 GOTO 590
4000 :
4010 REM ****************************
4020 REM * SORT ENTRIES *
4030 REM ****************************
4040 :
4050 PRINT CHR$(147):LET E=0
4060 :
4070 OPEN F,8,2,"0:"+S$(C)+",S,R"
4080 INPUT#F,E
4090 :
4100 FOR X=1 TO E
4110 INPUT#F,SOFT$(X)
4120 LET D$(X)=SOFT$(X)
4130 NEXT X
4140 :
4150 CLOSE F
4160 :
4170 GOSUB 4500
4180 :
4190 OPEN F,8,2,"@0:"+S$(C)+",S,W"
4200 PRINT#F,E
4210 :
4220 FOR X=1 TO E
4230 PRINT#F,SOFT$(I(X))
4240 NEXT X
4250 :
4260 CLOSE F
4270 :
4280 GOTO 590
4500 :
4510 REM ****************************
4520 REM * SORT MODULE *
4530 REM ****************************
4540 :
4550 PRINTCHR$(147)
4560 PRINTTAB(7)"***** SORTING ENTRIES *****"
4570 :
4580 FOR X=1 TO E
4590 LET I(X)=X
4600 NEXT X
4610 :
4620 LET M=E-1
4630 LET T3=0
4640 :
4650 IF T3=1 THEN 4880
4660 LET S2=1
4670 LET T3=1
4680 :
4690 IF S2>M THEN 4850
4700 IF D$(S2)>D$(S2+1) THEN 4730
4710 GOTO 4820
4720 :
4730 LET H=I(S2)
4740 LET I(S2)=I(S2+1)
4750 LET I(S2+1)=H
4760 LET H$=D$(S2)
4770 LET D$(S2)=D$(S2+1)
4780 LET D$(S2+1)=H$
4790 LET T3=S2
4800 GOTO 4820
4810 :
4820 LET S2=S2+1
4830 GOTO 4690
4840 :
4850 LET M=T3-1
4860 GOTO 4650
4870 :
4880 RETURN
5000 :
5010 REM ****************************
5020 REM * PRINT ENTRIES *
5030 REM ****************************
5040 :
5050 PRINTCHR$(147):LET E=0
5054 :
5055 GOSUB 8000
5056 :
5060 PRINT"";S$(C);"[146]"
5070 PRINT:PRINT
5080 PRINT"PREPARE PRINTER AND PRESS P[146] TO PRINT"
5081 GET A$:IF A$="" THEN 5081
5082 IF A$<>"P" THEN 590
5090 :
5094 :
5095 GOSUB 9000
5096 :
5100 OPEN F,8,2,"0:"+S$(C)+",S,R"
5110 INPUT#F,E
5120 :
5130 FOR X=1 TO E
5140 INPUT#F,SOFT$(X)
5150 NEXT X
5160 :
5170 CLOSE F
5180 :
5185 PRINT:PRINT:PRINT:PRINT"PRINTING...."
5190 OPEN4,4
5194 :
5195 GOSUB 8000
5196 :
5200 PRINT#4,"***** ";S$(C);" *****"
5210 PRINT#4
5220 PRINT#4
5225 :
5230 FOR X=1 TO E
5240 PRINT#4,STR$(X);". ";SOFT$(X)
5250 NEXT X
5260 :
5270 PRINT#4
5280 PRINT#4
5290 PRINT#4,"***** END OF LISTING *****"
5291 PRINT#4:PRINT#4:PRINT#4:PRINT#4:PRINT#4:PRINT#4
5300 :
5310 CLOSE 4
5320 :
5330 GOTO 590
8000 :
8010 IF C=3 THEN LET S$(3)="BUSINESS SOFTWARE"
8020 IF C=4 THEN LET S$(4)="COMPUTER ART SOFTWARE"
8030 IF C=5 THEN LET S$(5)="EDUCATIONAL SOFTWARE"
8040 IF C=7 THEN LET S$(7)="ROLL-PLAYING GAMES"
8050 IF C=11 THEN LET S$(11)="MISCELLANEOUS SOFTWARE"
8060 :
8070 RETURN
8080 :
9000 :
9010 IF C=3 THEN LET S$(3)="BUSINESS"
9020 IF C=4 THEN LET S$(4)="COMPUTER ART"
9030 IF C=5 THEN LET S$(5)="EDUCATIONAL"
9040 IF C=7 THEN LET S$(7)="ROLL-PLAYING"
9050 IF C=11 THEN LET S$(11)="MISCELLANEOUS"
9060 :
9070 RETURN
9080 :
10000 :
10010 PRINTCHR$(147)
10020 PRINT"PROGRAM TERMINATED BY OPERATOR"
10030 END